import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui';

import 'element-ui/lib/theme-chalk/index.css';

// 导入组件 及 组件样式
import { mavonEditor } from 'mavon-editor';     //引入mavon-editor组件
import 'mavon-editor/dist/css/index.css';       //引入组件的样式
Vue.use(mavonEditor);

Vue.config.productionTip = false;
Vue.use(ElementUI);

// Vue.use(request("vue-wechat-title"));

//引入axios
import axios from "axios";
// axios.defaults.baseURL = 'http://mayestudio.com:8999';
axios.defaults.baseURL = 'http://localhost:9988/hrsystem_spring';
// axios.defaults.baseURL = 'http://ningxc.cn:9988/hrsystem-spring';

axios.defaults.validateStatus = val => val >= 200 && val <= 500
Vue.prototype.$axios = axios;

//引入vue-router
import VueRouter from "vue-router";

//引入路由配置
import router from "@/router/router";

// 引入vuex的store，并注册到vue实例中
// import store from "@/store/store";

Vue.use(VueRouter);

/* 路由发生变化修改页面title */
router.beforeEach((to, from, next) => {
  if (to.meta.title) {
    document.title = to.meta.title
  }
  next()
})
import vueMiniPlayer from 'vue-mini-player'
import 'vue-mini-player/lib/vue-mini-player.css'
Vue.use(vueMiniPlayer)

//引入video.js
import Video from 'video.js'
import 'video.js/dist/video-js.css'

Vue.prototype.$video = Video


new Vue({

  // store,
  mavonEditor,
  router,
  render: h => h(App),
}).$mount('#app')
